import os

data_dir = "D:\\简尚家居\\excel文件\\2020_07_08\\拼多多－源数据\\拼多多-TOP100单品\\"

"""获取文件列表"""


def getRawFileList(path):
    """-------------------------
    files,names=getRawFileList(raw_data_dir)
    files: ['datacn/dialog/one.txt', 'datacn/dialog/two.txt']
    names: ['one.txt', 'two.txt']
    ----------------------------"""
    files = []
    names = []
    for f in os.listdir(path):
        if not f.endswith("~") or not f == "":  # 返回指定的文件夹包含的文件或文件夹的名字的列表
            files.append(os.path.join(path, f))  # 把目录和文件名合成一个路径
            names.append(f)
    return files, names

if __name__ == '__main__':
    debug = getRawFileList(data_dir)
    print(debug)
    # print(__name__)
